package com.fangcun.entity;

import java.util.Date;

import org.springframework.util.StringUtils;

import lombok.Data;

@Data
public class OrderAddress {
	private Long id;

	private Long mainOrderId;

	private Integer type;

	private String receivingName;

	private String phone;

	private Integer genderType;

	private Integer addressType;

	private String provinceCode;

	private String provinceName;

	private String cityCode;

	private String cityName;

	private String areaCode;

	private String areaName;

	private String latitude;

	private String longitude;

	private String expressCompany;

	private String expressNumber;

	private String street;

	private Date deliveryTime;

	private Date createTime;

	public String getAddress() {
		String str = "";
		if (!StringUtils.isEmpty(this.provinceName)) {
			str += this.provinceName;
		}
		if (!StringUtils.isEmpty(this.cityName)) {
			str += this.cityName;
		}
		if (!StringUtils.isEmpty(this.areaName)) {
			str += this.areaName;
		}
		if (!StringUtils.isEmpty(this.street)) {
			str += this.street;
		}
		return str;
	}

}